/**
 * 作者：陈文斌 on 2019/1/12.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:flutter/material.dart';
import 'package:crm/constant/constant.dart';

class IndustrySubCategoryListRowSection extends StatelessWidget {
  final String title;
  final GestureTapCallback onTap;
  final isSelect;

  IndustrySubCategoryListRowSection({
    Key key,
    this.title,
    this.onTap,
    this.isSelect = false,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Material(
      borderRadius: BorderRadius.circular(3),
      child: InkWell(
        onTap: onTap,
        child: Container(
          height: 30,
          padding: EdgeInsets.fromLTRB(10, 5, 10, 5),
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(3),
            border: Border.all(
              width: 1,
              color: isSelect
                  ? AppColors.MainColor
                  : AppColors.CommonButtonBGColor,
            ),
          ),
          child: Text(
            title,
            style: TextStyle(
              color: isSelect ? AppColors.MainColor : AppColors.DetailTextColor,
              fontSize: AppFontSizes.Font13,
            ),
          ),
        ),
      ),
    );
  }
}
